package com.b2b.model.entity.company;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@Table(name = "company_info")
public class CompanyInfo implements Serializable {

    private static final long serialVersionUID = 3342723124953988435L;

    @Id
    @GeneratedValue(generator = "JDBC")
    @Column(name = "company_id")
    private Integer companyId;

    @NotNull(message = "企业名称不能为空")
    @Column(name = "company_name")
    private String companyName;

    //@NotNull(message = "企业图册不能为空")
    @Column(name = "img_url_list")
    private String imgUrlList;

    //@NotNull(message = "主营产品或服务不能为空")
    @Column( name = "main_products_services" )
    private String mainProductsServices;

    //@NotNull(message = "主营行业不能为空")
    @Column(name = "main_business")
    private String mainBusiness;

   // @NotNull(message = "注册资金不能为空")
    @Column(name = "registered_capital")
    private Integer registeredCapital;

    //@NotNull(message = "注册时间不能为空")
    @Column(name = "registered_time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date registeredTime;

   // @NotNull(message = "注册地不能为空")
    @Column(name = "registered_area")
    private String registeredArea;

   // @NotNull(message = "企业类型不能为空")
    @Column(name = "company_type")
    private String companyType;

   // @NotNull(message = "主营产品或服务不能为空")
    @Column( name = "corporation_name" )
    private String corporationName;

    //@NotNull(message = "注册资金不能为空")
    @Column(name = "management_certification")
    private String managementCertification;

    //@NotNull(message = "注册时间不能为空")
    @Column(name = "quality_certification")
    private String qualityCertification;

    //@NotNull(message = "企业图册不能为空")
    private Integer employees;

    //@NotNull(message = "主营产品或服务不能为空")
    @Column( name = "plant_area" )
    private Integer plantArea;

    //@NotNull(message = "注册资金不能为空")
    @Column(name = "main_sales_area")
    private String mainSalesArea;

    //@NotNull(message = "注册时间不能为空")
    @Column(name = "monthly_production")
    private Integer monthlyProduction;

    //@NotNull(message = "注册资金不能为空")
    @Column(name = "annual_turnover")
    private Integer annualTurnover;

    //@NotNull(message = "注册时间不能为空")
    @Column(name = "brand")
    private String brand;

    //@NotNull(message = "企业名称不能为空")
    @Column(name = "business_license")
    private String businessLicense;

    //@NotNull(message = "企业图册不能为空")
    @Column(name = "master_phone")
    private String masterPhone;

    //@NotNull(message = "主营产品或服务不能为空")
    @Column( name = "email" )
    private String email;

    //@NotNull(message = "注册资金不能为空")
    @Column(name = "state")
    private Character state;
}
